make updates recommended by @dsanders

Brian Petro 9 years ago
parent
commit
0d2ff44c3c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/models/agents/twitter_search_agent.rb

+ 3 - 3
app/models/agents/twitter_search_agent.rb

@@ -13,7 +13,7 @@ module Agents
13 13
 
14 14
       You must provide the desired `search`.
15 15
       
16
-      Set `result_type` (String) — Specifies what type of search results you would prefer to receive. Options are "mixed", "recent", and "popular". (default: `mixed`)
16
+      Set `result_type` to specify which [type of search results](https://dev.twitter.com/rest/reference/get/search/tweets) you would prefer to receive. Options are "mixed", "recent", and "popular". (default: `mixed`)
17 17
 
18 18
       Set `expected_update_period_in_days` to the maximum amount of time that you'd expect to pass between Events being created by this Agent.
19 19
 
@@ -76,12 +76,12 @@ module Agents
76 76
 
77 77
     def check
78 78
       since_id = memory['since_id'] || nil
79
-      opts = {:include_entities => true}
79
+      opts = {include_entities: true}
80 80
       opts.merge! result_type: interpolated[:result_type] if interpolated[:result_type].present?
81 81
       opts.merge! :since_id => since_id unless since_id.nil?
82 82
 
83 83
       # http://www.rubydoc.info/gems/twitter/Twitter/REST/Search
84
-      tweets = twitter.search(interpolated['search'], opts).take(100)
84
+      tweets = twitter.search(interpolated['search'], opts).to_a
85 85
 
86 86
       tweets.each do |tweet|
87 87
         if tweet.created_at >= starting_at